package org.apache.flink.runtime.resourceconsumer.runner;

import org.apache.elasticresource.api.BusinessResourceConsumer;
import org.apache.flink.api.common.ConsumerID;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.runtime.heartbeat.HeartbeatServices;
import org.apache.flink.runtime.highavailability.HighAvailabilityServices;
import org.apache.flink.runtime.resourceconsumer.factories.ConsumerManagerConsumerMetricGroupFactory;
import org.apache.flink.runtime.rpc.FatalErrorHandler;
import org.apache.flink.runtime.rpc.RpcService;

/**
 * @类名: ResourceConsumerRunnerFactory
 * @说明: 资源消费者runner工厂
 *
 * @author   leehom
 * @Date	 2023年10月26日 上午10:04:10
 * 修改记录：
 *
 * @see 	 
 */
@FunctionalInterface
public interface ResourceConsumerRunnerFactory {

	ResourceConsumerRunner createResourceConsumerRunner(
			ConsumerID consumerId,
			String consumerName,
            Configuration configuration,
            RpcService rpcService,
            HighAvailabilityServices highAvailabilityServices,
            HeartbeatServices heartbeatServices,
            ConsumerManagerConsumerMetricGroupFactory consumerManagerConsumerMetricGroupFactory,
            FatalErrorHandler fatalErrorHandler,
            long initializationTimestamp,
            BusinessResourceConsumer businessResourceConsumer)
            throws Exception;
}

